package business

import (
	"ginBasic/app/common/model"
)

type BaseBus struct{}

func (b BaseBus) GetAccessAndRole(id int) map[int]int {
	roleAccess := model.AccessRoleModel.GetAccessByRoleId(id)
	roleAccessMap := make(map[int]int)
	for _, v := range roleAccess {
		roleAccessMap[v.AccessId] = v.AccessId
	}
	return roleAccessMap
}
